<template>
    <div>
        <li class="mui-table-view-cell mui-media" v-for="(item,i) in 10" :key="item">
            <router-link :to="'/home/goodsInfo/'+item" class="">
                <img class="mui-media-object mui-pull-left" src="">
                <div class="mui-media-body">
                    商品：{{item}}
                    <p class="mui-ellipsis">
                        <span>发表时间：{{timeData | dataForm}}</span>
                        <span class="colorRed">价格：{{item*2}}</span>
                    </p>
                </div>
            </router-link>
        </li>
    </div>
</template>
<script>
    export default {
        data(){
            return {
                newsData:[],
                timeData:new Date().toString()
            }
        },
        methods:{
            getDate(){
                this.$http.get('http://vue.studyit.io/api/getnewslist').then(res=>{
                    //http://vue.studyit.io/api/getimgcategory
                    console.log(res);
                })
            }
        },
        created(){
            // this.getDate();
        },
        filters:{
            dataForm(d){
                let dat = new Date(d);
                console.log(dat.getMonth());
                return "2015-12-20";
            }
        }
    }
</script>
<style scoped lang="less">
    li{
        list-style:none;
    }
    .mui-ellipsis{
        display:flex;
        justify-content:space-between;
    }
    .colorRed{
        color:red;
        font-size:20px;
    }
</style>